//
//  NSString+NWEmpty.m
//  mesu
//
//  Created by dl on 2018/7/5.
//  Copyright © 2018年 gdmesu. All rights reserved.
//

#import "NSString+NWEmpty.h"

@implementation NSString (NWEmpty)

+ (BOOL) nw_isNotEmptyString:(NSString *)str
{
    if ([str isKindOfClass:[NSString class]]) {
        return [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0;
    }
    return NO;
}

+ (BOOL) nw_isEmptyString:(NSString *)str
{
    return ![NSString nw_isNotEmptyString:str];
}

+ (BOOL) nw_isNotEmptyStringWithoutTrim:(NSString *)str
{
    return [str isKindOfClass:[NSString class]] && str.length > 0;
}

+ (BOOL) nw_isEmptyStringWithoutTrim:(NSString *)str
{
    return [NSString nw_isNotEmptyStringWithoutTrim:str];
}

@end
